import { useTable, LIST_TYPE } from '@crud/index';
import { getRoleList as getList } from '@/api/crm-kgj/auth';

export const useTableList = (options: any = {}) => {
  const columns = [
    {
      label: '岗位名称',
      prop: 'role_name',
      width: 280
    },
    {
      label: '岗位说明',
      prop: 'role_desc'
    },
    {
      label: '账号数量',
      prop: 'account_count',
      render: 'account_count',
      align: 'center',
      width: 100
    },
    {
      label: '状态',
      prop: 'is_frozen',
      align: 'center',
      render: 'is_frozen',
      width: 200
    },
    {
      label: '操作',
      align: 'center',
      render: 'actions',
      width: 160,
      fixed: 'right'
    }
  ];

  return useTable({
    ...options,
    type: LIST_TYPE.KGJ,
    params: {

    },
    columns,
    getList
  });
};
